//
//  PzGuideHelper.swift
//  Pz
//
//  Created by 蓝鳍互娱 on 2024/6/27.
//

import Foundation
import UIKit
class PzGuideHelper: NSObject {
    @objc public static var shareManage = PzGuideHelper()
    var guideFinishBlock : (()->Void)?

    @objc open func showGuideAlert(){
        let defFirst:String? = UserDefaults.standard.value(forKey: "pzDefFirst") as? String
        if defFirst != "2" {
            let homeGuideView = PzHomeGuideView()
            let pzAppdelegate:AppDelegate = UIApplication.shared.delegate as! AppDelegate
            
            pzAppdelegate.window?.rootViewController?.view.addSubview(homeGuideView)
            homeGuideView.snp.makeConstraints { make in
                make.edges.equalToSuperview()
            }
            homeGuideView.guideFinishBlock = {
                self.guideFinishBlock?()
            }
        }
       
    }
}
